<%@ page contentType="text/html; charset=UTF-8"%>
<%@page import="frm.ssh.util.page.SearchBean"%>
<%@ include file="/jsp/common/common.jsp"%>
<html>
	<head>
		<script language="javascript" src="<%=contextPath%>/js/func.js"type=""></script>
		<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
		
		<script language="javascript" src="<%=contextPath%>/ext3/examples/ux/ColumnHeaderGroup.js"type=""></script>
		<link rel="stylesheet" type="text/css" href="<%=contextPath%>/ext3/examples/ux/css/ColumnHeaderGroup.css" />
	</head>
	<body style="margin: 0;overflow:hidden"> 
	<script type="text/javascript">
		Ext.onReady(function(){
			
			  Ext.QuickTips.init();
			   
			  var    fields = [
			                    {type: 'int', name: 'BeijingProductX'},
			                    {type: 'int', name: 'BeijingProductY'},
			                    {type: 'int', name: 'TokyoProductX'},
			                    {type: 'int', name: 'TokyoProductY'},
			                    {type: 'int', name: 'BerlinProductX'},
			                    {type: 'int', name: 'BerlinProductY'},
			                    {type: 'int', name: 'LondonProductX'},
			                    {type: 'int', name: 'LondonProductY'},
			                    {type: 'int', name: 'LondonProductY2'},
			                    {type: 'int', name: 'ParisProductX'},
			                    {type: 'int', name: 'ParisProductY'},
			                    {type: 'int', name: 'LondonProductX1'},
			                    {type: 'int', name: 'LondonProductY1'},
			                    {type: 'int', name: 'ParisProductX1'},
			                    {type: 'int', name: 'ParisProductY1'},
			                    {type: 'int', name: 'ParisProductX2'},
			                    {type: 'int', name: 'ParisProductY2'}
			                   ],
				    columns = [ {dataIndex: 'BeijingProductX', header: '序号'},
				                {dataIndex: 'BeijingProductY', header: '开始时间'},
				                {dataIndex: 'TokyoProductX', header: '结束时间'},
				                {dataIndex: 'TokyoProductY', header: '变电站'},
				                {dataIndex: 'BerlinProductX', header: '停电范围'},
				                {dataIndex: 'BerlinProductY', header: '电压等级'},
				                {dataIndex: 'LondonProductX', header: '设备类别'},
				                {dataIndex: 'LondonProductY', header: '工作项目'},
				                {dataIndex: 'LondonProductY2', header: '总负责人'},
				                {dataIndex: 'ParisProductX', header: '负责人'},
				                {dataIndex: 'ParisProductY', header: '成员'},
				                {dataIndex: 'LondonProductX1', header: '负责人'},
				                {dataIndex: 'LondonProductY1', header: '成员'},
				                {dataIndex: 'ParisProductX1', header: '负责人'},
				                {dataIndex: 'ParisProductY1', header: '成员'},
				                {dataIndex: 'ParisProductX2', header: '负责人'},
				                {dataIndex: 'ParisProductY2', header: '成员'}],
				    data = [],
				    arr = [];
              		for(var i = 0; i < 20; ++i){
                  		arr.push((Math.floor(Math.random()*18) + 1) * 100000);
              		}
                    data.push(arr);
				   	topGroupRow = [
								{},
							   	{},
							   	{},
								{},
								{},
								{},
								{},
								{},
								{ header: '工作组织', colspan: 9, align: 'center' }],
				    groupRow = [{},
							   	{},
							   	{},
								{},
								{},
								{},
								{},
								{},
								{ header: '多班组', colspan: 1, align: 'center' },
								{ header: '变电检修班', colspan: 2, align: 'center' },
								{ header: '变压器班', colspan: 2, align: 'center' },
								{ header: '继电保护班', colspan: 2, align: 'center' },
								{ header: '试验油务班', colspan: 2, align: 'center' }];
				     
				
				    
				   
				    var group = new Ext.ux.grid.ColumnHeaderGroup({
				        rows: [topGroupRow, groupRow]
				    });
				    
				   
				    var grid = new Ext.grid.GridPanel({
				        renderTo: 'grid',
				        title: '月度计划查询',
				        width: 1000,
				        autoheight: true,
				        autoScroll: true,  
				        store: new Ext.data.ArrayStore({
				            fields: fields,
				            data: data
				        }),
				        columns: columns,
				        viewConfig: {
				            forceFit: true
				        },
				        plugins: group,
				        bbar: new Ext.PagingToolbar({  
				            //store: SalesAnastore,  
				           // pageSize: pageSize,  
				            //显示右下角信息  
				            displayInfo: true,  
				            displayMsg: '当前记录 {0} -- {1} 条 共 {2} 条记录',  
				            emptyMsg: "没有记录",  
				            prevText: "上一页",  
				            nextText: "下一页",  
				            refreshText: "刷新",  
				            lastText: "最后页",  
				            firstText: "第一页",  
				            beforePageText: "当前页",  
				            afterPageText: "共{0}页"
				        }),
				        tbar:['请选择查询的年月',
						       {
						       	xtype:'datefield',
				        	 	format:'Y-m'
					           },
				        	   { text: '&nbsp;查&nbsp;&nbsp;询&nbsp;',pressed: true}
				    	] 
				    });
			  
		});
		</script>
			<div id="grid" style="width:100%;height:100%;"></div>		
        </div> 
	</body>
</html>

